package o;

import com.huawei.appgallery.foundation.account.bean.UserSession;

public class ceo {
    private static ceo ॱ;
    private int ˊ = -1;
    private boolean ˎ;

    public static synchronized ceo ˎ() {
        ceo o_ceo;
        synchronized (ceo.class) {
            if (ॱ == null) {
                ॱ = new ceo();
            }
            o_ceo = ॱ;
        }
        return o_ceo;
    }

    public synchronized int ॱ() {
        int ॱ;
        if (eqp.ᐝ()) {
            ॱ = eua.ˏ().ॱ(cen.ˋ, 1);
        } else if (UserSession.getInstance().isLoginSuccessful()) {
            ॱ = this.ˊ;
        } else {
            ॱ = -1;
        }
        return ॱ;
    }

    public synchronized void ˎ(int i) {
        this.ˊ = i;
        if (eqp.ᐝ()) {
            ˋ(i);
        }
    }

    public synchronized boolean ˏ() {
        boolean z;
        if (eqp.ᐝ()) {
            z = true;
        } else if (UserSession.getInstance().isLoginSuccessful()) {
            z = this.ˎ;
        } else {
            z = false;
        }
        return z;
    }

    public synchronized void ˊ(boolean z) {
        this.ˎ = z;
    }

    public synchronized void ˋ() {
        this.ˎ = false;
        this.ˊ = -1;
        eua.ˏ().ʼ(cen.ˋ);
    }

    private void ˋ(int i) {
        eua.ˏ().ˊ(cen.ˋ, i);
    }
}
